package com.lab

import android.app.Activity
import java.util.*

object ActivityStack {
    val stacks by lazy {
        Stack<Activity>()
    }


    @JvmStatic fun add(activity: Activity){
        stacks.add(activity)
    }

    @JvmStatic fun finishAll(){
        for (a in stacks){
            a.finish()
        }
        stacks.clear()
    }
}
